
<nav class="navbar" role="navigation" aria-label="main navigation">
  <div class="navbar-brand">
    <%= link_to rails_performance.rails_performance_url, class: "navbar-item logo" do %>
      <h2>Rails Performance</h2>
    <% end %>

    <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
      <span aria-hidden="true"></span>
      <span aria-hidden="true"></span>
      <span aria-hidden="true"></span>
    </a>
  </div>

  <div id="navbarBasicExample" class="navbar-menu">
    <div class="navbar-start">
      <%= link_to 'Dashboard', rails_performance.rails_performance_url, class: "navbar-item #{active?(:dashboard)}" %>
      <%= link_to 'Requests Analysis', rails_performance.rails_performance_requests_url, class: "navbar-item #{active?(:requests)}" %>
      <%= link_to 'Recent Requests', rails_performance.rails_performance_recent_url, class: "navbar-item #{active?(:recent)}" %>
      <% if RailsPerformance._resource_monitor_enabled %>
        <%= link_to 'System', rails_performance.rails_performance_resources_url, class: "navbar-item #{active?(:resources)}" %>
      <% end %>
      <%= link_to 'Slow Requests', rails_performance.rails_performance_slow_url, class: "navbar-item #{active?(:slow)}" %>
      <%= link_to '500 Errors', rails_performance.rails_performance_crashes_url, class: "navbar-item #{active?(:crashes)}" %>
      <% if defined?(Sidekiq) %>
        <%= link_to 'Sidekiq', rails_performance.rails_performance_sidekiq_url, class: "navbar-item #{active?(:sidekiq)}" %>
      <% end %>
      <% if defined?(Delayed::Job) %>
        <%= link_to 'Delayed::Job', rails_performance.rails_performance_delayed_job_url, class: "navbar-item #{active?(:delayed_job)}" %>
      <% end %>
      <% if defined?(Grape) %>
        <%= link_to 'Grape', rails_performance.rails_performance_grape_url, class: "navbar-item #{active?(:grape)}" %>
      <% end %>
      <% if RailsPerformance.include_rake_tasks %>
        <%= link_to 'Rake', rails_performance.rails_performance_rake_url, class: "navbar-item #{active?(:rake)}" %>
      <% end %>
      <% if RailsPerformance.include_custom_events %>
        <%= link_to 'Custom Events', rails_performance.rails_performance_custom_url, class: "navbar-item #{active?(:custom)}" %>
      <% end %>
    </div>

    <div class="navbar-end">
      <div class="navbar-item">
        <div class="buttons">
          <%= link_to RailsPerformance.home_link, class: "button is-light home_icon" do %>
            <%= icon('home') %>
          <% end %>
        </div>
      </div>
    </div>
  </div>
</nav>
